import React, { Component } from "react";
import { connect } from 'react-redux';
import {fromJS} from 'immutable';
import { ShopHeader } from "../style";
import { Link } from "react-router-dom";
class Home extends Component {
    render() {
        let { selectCity } = this.props;
        return (
            <>
                <ShopHeader>
                    <Link to="/city" className="city">{selectCity}
                        <span className="iconfont">&#xe688;</span>
                    </Link>
                    <Link to="/shopSearch" className="search"><input /></Link>
                    <div className="usericon">
                        <span className="iconfont">&#xe604;</span></div>
                </ShopHeader>
            </>
        );
    }
}
const mapStateToProps = (state, ownProps) => {
    state= fromJS(state);
    return {
        selectCity: state.getIn(["city", "selectCity"]),
    };
};
const mapDispatchToProps = (dispatch, ownProps) => {
    return {
    };
};
export default connect(mapStateToProps, mapDispatchToProps)(Home);
